package com.yan.demo;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        // 定义姓名变量
        String name;
        // 定义年龄变量
        int age;
        // 定义性别变量
        String sex;
        // 键盘输入
        Scanner scanner = new Scanner(System.in);
        name = scanner.next();
        age = scanner.nextInt();
        sex = scanner.next();
        // 输出
        System.out.println("name = " + name);
        System.out.println("age = " + age);
        System.out.println("sex = " + sex);
    }
}
